package com.mianle.userapi.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;

import java.util.Map;

/**
 * Created by tangxin on 2018/04/05
 */
@Configuration
@ConfigurationProperties(prefix = "cors")
@Data
public class CorsConfig {

    private static final Integer DEFAULT_CORS_FILTER_ORDER = Ordered.HIGHEST_PRECEDENCE;


    private Integer filterOrder = DEFAULT_CORS_FILTER_ORDER;

    private String enable;

    private Map<String,String> urlToAllowOrigins;
}

